Logic programming - definizione. Che cos'è Logic programming
Diclib.com
Dizionario ChatGPT
Inserisci una parola o una frase in qualsiasi lingua 👆
Lingua:

Traduzione e analisi delle parole tramite l'intelligenza artificiale ChatGPT

In questa pagina puoi ottenere un'analisi dettagliata di una parola o frase, prodotta utilizzando la migliore tecnologia di intelligenza artificiale fino ad oggi:

  • come viene usata la parola
  • frequenza di utilizzo
  • è usato più spesso nel discorso orale o scritto
  • opzioni di traduzione delle parole
  • esempi di utilizzo (varie frasi con traduzione)
  • etimologia

Cosa (chi) è Logic programming - definizione

PROGRAMMING PARADIGM BASED ON FORMAL LOGIC
Logical programming; Rule-based programming; Logical (programming); Rule-based (programming); Logic programming language; Logic program; Logic Programming; Rule-Based; Relational programming; Higher order logic programming; Higher-order logic programming; Object-oriented logic programming; Metalogic programming; Linear logic programming; Transaction logic programming; Logic language; History of logic programming

logic programming         
<artificial intelligence, programming, language> A declarative, relational style of programming based on first-order logic. The original logic programming language was Prolog. The concept is based on Horn clauses. The programmer writes a "database" of "facts", e.g. wet(water). ("water is wet") and "rules", e.g. mortal(X) :- human(X). ("X is mortal is implied by X is human"). Facts and rules are collectively known as "clauses". The user supplies a "goal" which the system attempts to prove using "resolution" or "backward chaining". This involves matching the current goal against each fact or the left hand side of each rule using "unification". If the goal matches a fact, the goal succeeds; if it matches a rule then the process recurses, taking each sub-goal on the right hand side of the rule as the current goal. If all sub-goals succeed then the rule succeeds. Each time a possible clause is chosen, a "choice point" is created on a stack. If subsequent resolution fails then control eventually returns to the choice point and subsequent clauses are tried. This is known as "backtracking". Clauses may contain logic variables which take on any value necessary to make the fact or the left hand side of the rule match a goal. Unification binds these variables to the corresponding subterms of the goal. Such bindings are associated with the choice point at which the clause was chosen and are undone when backtracking reaches that choice point. The user is informed of the success or failure of his first goal and if it succeeds and contains variables he is told what values of those variables caused it to succeed. He can then ask for alternative solutions. (1997-07-14)
Logic programming         
Logic programming is a programming paradigm which is largely based on formal logic. Any program written in a logic programming language is a set of sentences in logical form, expressing facts and rules about some problem domain.
Inductive logic programming         
  • Assumed family relations in section "Example"
LEARNING LOGIC PROGRAMS FROM DATA
Inductive Logic Programming; Probabilistic inductive logic programming
Inductive logic programming (ILP) is a subfield of symbolic artificial intelligence which uses logic programming as a uniform representation for examples, background knowledge and hypotheses. Given an encoding of the known background knowledge and a set of examples represented as a logical database of facts, an ILP system will derive a hypothesised logic program which entails all the positive and none of the negative examples.

Wikipedia

Logic programming

Logic programming is a programming paradigm which is largely based on formal logic. Any program written in a logic programming language is a set of sentences in logical form, expressing facts and rules about some problem domain. Major logic programming language families include Prolog, answer set programming (ASP) and Datalog. In all of these languages, rules are written in the form of clauses:

H :- B1, …, Bn.

and are read declaratively as logical implications:

H if B1 and … and Bn.

H is called the head of the rule and B1, ..., Bn is called the body. Facts are rules that have no body, and are written in the simplified form:

H.

In the simplest case in which H, B1, ..., Bn are all atomic formulae, these clauses are called definite clauses or Horn clauses. However, there are many extensions of this simple case, the most important one being the case in which conditions in the body of a clause can also be negations of atomic formulas. Logic programming languages that include this extension have the knowledge representation capabilities of a non-monotonic logic.

In ASP and Datalog, logic programs have only a declarative reading, and their execution is performed by means of a proof procedure or model generator whose behaviour is not meant to be controlled by the programmer. However, in the Prolog family of languages, logic programs also have a procedural interpretation as goal-reduction procedures:

to solve H, solve B1, and ... and solve Bn.

Consider the following clause as an example:

fallible(X) :- human(X).

based on an example used by Terry Winograd to illustrate the programming language Planner. As a clause in a logic program, it can be used both as a procedure to test whether X is fallible by testing whether X is human, and as a procedure to find an X which is fallible by finding an X which is human. Even facts have a procedural interpretation. For example, the clause:

human(socrates).

can be used both as a procedure to show that socrates is human, and as a procedure to find an X that is human by "assigning" socrates to X.

The declarative reading of logic programs can be used by a programmer to verify their correctness. Moreover, logic-based program transformation techniques can also be used to transform logic programs into logically equivalent programs that are more efficient. In the Prolog family of logic programming languages, the programmer can also use the known problem-solving behaviour of the execution mechanism to improve the efficiency of programs.